/* 
 * Project: colobok
 * and open the template in the editor.
 * @author: Sviatoslav Mysachenko <svyatoslavik@gmail.com>
 */

var Core = {
    components:{},
    getComponent:function(componentName){
        if(typeof this.components[componentName]!='undefined')
            return this.components[componentName];
        else 
            throw('Component ['+componentName+'] is not registered');
    },
    registerComponent:function(componentName, componentInterface){
        if(typeof this.components[componentName]!='undefined')
            throw('Try redeclare component. Component ['+componentName+'] allredy registered');
        else this.components[componentName] = componentInterface;
    }
   
}